package com.ds.infrastructure.hyperspace.console.service.inf;

import com.ds.infrastructure.hyperspace.console.common.methodlock.MethodLockId;
import com.ds.infrastructure.hyperspace.console.entity.table.TbContainerConfig;
import com.ds.infrastructure.hyperspace.console.entity.where.TbCustomWhere;
import com.ds.infrastructure.hyperspace.console.service.BaseService;

/**
 * @author: yaozhendong
 * @create: 2019-09-18 18:38
 **/
public interface IContainerConfigService extends BaseService<TbContainerConfig> {

    TbContainerConfig getOrThrow(Long id);

    TbContainerConfig getOrThrow(Long id, String exceptionTitle);

    boolean isExist(Long id);


    Integer selectMaxForConfigVersion(TbContainerConfig where, TbCustomWhere mapWhere);


    void commit(MethodLockId methodLockId, TbContainerConfig entity, String userName, String userId);

    TbContainerConfig selectLastOne(Long stageId, Long environmentId);

    TbContainerConfig getLastOneWithMethodLockId(MethodLockId methodLockId, Long stageId, Long environmentId);

    int updateWithTimestamp(TbContainerConfig newEntity);

    int rollback(TbContainerConfig entity);

}
